home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PD Collection CD 1
/
PD Collection CD 1.iso
/
textual
/
pdftops
/
xpdf
/
h
/
Catalog
< prev
next >
Wrap
Text File
|
1996-06-08
|
1KB
|
58 lines
//========================================================================
//
// Catalog.h
//
// Copyright 1996 Derek B. Noonburg
//
//========================================================================
#ifndef CATALOG_H
#define CATALOG_H
#ifdef __GNUC__
//#pragma interface
#endif
class Object;
class Page;
class PageAttrs;
class Ref;
//------------------------------------------------------------------------
// Catalog
//------------------------------------------------------------------------
class Catalog {
public:
// Constructor.
Catalog(Object *catDict);
// Destructor.
~Catalog();
// Is catalog valid?
GBool isOk() { return ok; }
// Get number of pages.
int getNumPages() { return numPages; }
// Get a page.
Page *getPage(int i) { return pages[i-1]; }
// Find a page, given its object ID. Returns page number, or 0 if
// not found.
int findPage(int num, int gen);
private:
Page **pages; // array of pages
Ref *pageRefs; // object ID for each page
int numPages; // number of pages
GBool ok; // true if catalog is valid
int readPageTree(Dict *pages, PageAttrs *attrs, int start);
};
#endif